<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // if语句
        let day = 5;
        if (day == 1) {
            console.log('需求会摸鱼');
        } else if (day == 2) {
            console.log('合理摸鱼');
        } else if (day == 3) {
            console.log('半天写代码')
        } else if (day == 4) {
            console.log('提测');
        } else if (day == 5) {
            console.log('发版');
        } else {
            console.log('睡觉');
        }
        // switch语句
        switch (day) {
            case 1:
                console.log('需求会摸鱼');
                break;
            case 2:
            console.log('合理摸鱼');
                break;
            default:
                break;
        }

        for(let i = 0;i<10;i++){
            console.log(i)
            if(i == 5){
                break;
            }
        }
        
        // 块级作用域
        console.log(i)
    </script>
</body>

</html>